﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using clf.weighing.entity;

namespace weighing
{
    /// <summary>
    /// 车辆排队表
    /// </summary>

    public class CarQueueVo : BaseVo
    {
        #region Constract
        public CarQueue mCarQueue;
        public CarQueueVo(CarQueue carQueue)
        {
            mCarQueue = carQueue;
        }
        #endregion
        public Int64 Id
        {
            get { return mCarQueue.id; }
            set
            {
                mCarQueue.id = value; OnPropertyChanged(this, nameof(Id));
            }
        }

        public String CarNumber
        {
            get
            {
                return mCarQueue.carNumber;
            }
            set
            {
                mCarQueue.carNumber = value;
                OnPropertyChanged(this, nameof(CarNumber));
            }
        }

        /// <summary>
        /// 注释:Ic 卡的编号 ，高频卡 EPC
        /// 可空:YES
        /// </summary>

        public String IcEpc
        {
            get
            {
                return mCarQueue.icEpc;
            }
            set
            {
                mCarQueue.icEpc = value;
                OnPropertyChanged(this, nameof(IcEpc));
            }
        }


        public String Driver
        {
            get
            {
                return mCarQueue.driver;
            }
            set
            {
                mCarQueue.driver = value;
                OnPropertyChanged(this, nameof(Driver));
            }
        }


        public String DriverMobile
        {
            get
            {
                return mCarQueue.driverMobile;
            }
            set
            {
                mCarQueue.driverMobile = value;
                OnPropertyChanged(this, nameof(DriverMobile));
            }
        }

        /// <summary>
        /// 注释:添加时间
        /// 可空:YES
        /// </summary>

        public DateTime? AddTime
        {
            get
            {
                return mCarQueue.addTime;
            }
            set
            {
                mCarQueue.addTime = value;
                OnPropertyChanged(this, nameof(AddTime));
            }
        }


        public DateTime? InTime
        {
            get
            {
                return mCarQueue.inTime;
            }
            set
            {
                mCarQueue.inTime = value;
                OnPropertyChanged(this, nameof(InTime));
            }
        }


        public DateTime? OutTime
        {
            get
            {
                return mCarQueue.outTime;
            }
            set
            {
                mCarQueue.outTime = value;
                OnPropertyChanged(this, nameof(OutTime));
            }
        }


        public Int64? WeighingBillId
        {
            get
            {
                return mCarQueue.weighingBillId;
            }
            set
            {
                mCarQueue.weighingBillId = value;
                OnPropertyChanged(this, nameof(WeighingBillId));
            }
        }

        public String WeighingNumber
        {
            get
            {
                return mCarQueue.weighingNumber;
            }
            set
            {
                mCarQueue.weighingNumber = value;
                OnPropertyChanged(this, nameof(WeighingNumber));
            }
        }

        /// <summary>
        /// 注释:状态 0等待中 1准备中 2过磅中 3完成
        /// 可空:YES
        /// 默认值:0
        /// </summary>

        public Int32? Status
        {
            get
            {
                return mCarQueue.status;
            }
            set
            {
                mCarQueue.status = value;
                OnPropertyChanged(this, nameof(Status));
            }
        }


        public String Remark
        {
            get
            {
                return mCarQueue.remark;
            }
            set
            {
                mCarQueue.remark = value;
                OnPropertyChanged(this, nameof(Remark));
            }
        }


        public Int32 IsDelete
        {
            get
            {
                return mCarQueue.isDelete;
            }
            set
            {
                mCarQueue.isDelete = value;
                OnPropertyChanged(this, nameof(IsDelete));
            }
        }


        public DateTime? DeleteTime
        {
            get
            {
                return mCarQueue.deleteTime;
            }
            set
            {
                mCarQueue.deleteTime = value;
                OnPropertyChanged(this, nameof(DeleteTime));
            }
        }

        /// <summary>
        /// 注释:删除原因
        /// 可空:YES
        /// </summary>

        public String DeleteReason
        {
            get
            {
                return mCarQueue.deleteReason;
            }
            set
            {
                mCarQueue.deleteReason = value;
                OnPropertyChanged(this, nameof(DeleteReason));
            }
        }


        public Int64? SyncTime
        {
            get
            {
                return mCarQueue.syncTime;
            }
            set
            {
                mCarQueue.syncTime = value;
                OnPropertyChanged(this, nameof(SyncTime));
            }
        }

        /// <summary>
        /// 注释:上传状态 0未上传 1已经上传
        /// 可空:NO
        /// 默认值:0
        /// </summary>

        public Int32 UpStatus
        {
            get
            {
                return mCarQueue.upStatus;
            }
            set
            {
                mCarQueue.upStatus = value;
                OnPropertyChanged(this, nameof(UpStatus));
            }
        }
        public String SendCompanyName
        {
            get
            {
                return mCarQueue.sendCompanyName;
            }
            set
            {
                mCarQueue.sendCompanyName = value;
                OnPropertyChanged(this, nameof(SendCompanyName));
            }
        }

        public String ReceiveCompanyName
        {
            get
            {
                return mCarQueue.receiveCompanyName;
            }
            set
            {
                mCarQueue.receiveCompanyName = value;
                OnPropertyChanged(this, nameof(ReceiveCompanyName));
            }
        }

        public Int64? MaterialId
        {
            get
            {
                return mCarQueue.materialId;
            }
            set
            {
                mCarQueue.materialId = value;
                OnPropertyChanged(this, nameof(MaterialId));
            }
        }
        public String MaterialName
        {
            get
            {
                return mCarQueue.materialName;
            }
            set
            {
                mCarQueue.materialName = value;
                OnPropertyChanged(this, nameof(MaterialName));
            }
        }
        public Int64? SortNo
        {
            get
            {
                return mCarQueue.sortNo;
            }
            set
            {
                mCarQueue.sortNo = value;
                OnPropertyChanged(this, nameof(SortNo));
            }
        }

        #region  Text
        public string StatusText
        {
            get
            {
                string text = "未知";
                switch (mCarQueue.status)
                {
                    case (int)CarQueueStatus.Waiting:
                        text = "等待中";
                        break;
                    case (int)CarQueueStatus.Ready:
                        text = "准备中";
                        break;
                    case (int)CarQueueStatus.Weighing:
                        text = "过磅中";
                        break;
                    case (int)CarQueueStatus.Finished:
                        text = "完成";
                        break;
                }
                return text;
            }
        }
        public int _index;

        public int Index
        {
            get { return _index; }
            set
            {
                _index = value;
                OnPropertyChanged(this, nameof(Index));
            }
        }

        #endregion
    }
}
